package com.kingyun.gpsinspection.purificationservice.dao.mapper.tdm;


import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.CRWebServiceVo;
import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.CheckRepair;
import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.CheckRepairVo;

import java.util.List;

/**
 * 检查维修Mapper
 */
public interface CheckRepairMapper {
    int deleteByPrimaryKey(String checkRepairId);

    int insert(CheckRepair record);

    int insertSelective(CheckRepair record);

    CheckRepair selectByPrimaryKey(String checkRepairId);

    int updateByPrimaryKeySelective(CheckRepair record);

    int updateByPrimaryKey(CheckRepair record);

    /**
     * 改写的根据主键查询包装类：还未编码
     *
     * @param checkRepairId
     * @return
     */
    CheckRepairVo selectByPrimaryKeyNew(String checkRepairId);

    /**
     * 改写的更新数据
     *
     * @param record
     * @return
     */
    int updateByPrimaryKeyNew(CheckRepair record);

    /**
     * 根据流程Id查询bean
     *
     * @param piPiid
     * @return
     */
    CheckRepairVo findVoByPiPiid(String piPiid);

    /**
     * 更新任务状态为执行中
     *
     * @param checkRepair
     * @return
     */
    int updateTaskStatusExecutedById(CheckRepair checkRepair);

    /**
     * 更新完成状态和完成时间
     *
     * @param checkRepair
     * @return
     */
    int updateFinishById(CheckRepair checkRepair);

    /**
     * 更新审核状态
     *
     * @param checkRepair
     * @return
     */
    int updateAuditStatusById(CheckRepair checkRepair);

    /**
     * 查询分页的总记录条数
     *
     * @param crWebServiceVo 查询封装类
     * @return Integer
     */
    Integer queryCount(CRWebServiceVo crWebServiceVo);

    /**
     * 查询当前分页数据
     *
     * @param crWebServiceVo 查询封装类
     * @return List<CRWebServiceVo>
     */
    List<CRWebServiceVo> queryList(CRWebServiceVo crWebServiceVo);

}